Open
Conversation
… only be 1. Modified logger-ldma to use universal handler.
…ting up false flags.
Seems that logger_ldma is expecting some other flag to function properly. Currently unable to fix logger_ldma myself (Lembitu). Went with easier approach letting logger_ldma to accept both flags. Currently seems to work. TODO: make actual fix
Madis242
reviewed
Mar 3, 2022
| #define SIZE_OF_ARRAY(arr) (sizeof(arr))/sizeof(arr[0]) | ||
|
|
||
| static volatile ldma_handler_conf_t m_head; | ||
| static volatile ldma_handler_conf_t m_head = {0xFF, NULL, 0, 0, NULL}; |
Contributor
There was a problem hiding this comment.
Use structre members names to initialize them e.g. const osThreadAttr_t app_thread_attr = { .name = "app" };
Madis242
reviewed
Mar 3, 2022
| while(ptr != NULL) | ||
| { | ||
| if ( pending & (1<<ptr->channel) ) | ||
| if ( pending & (1 << ptr->channel) ) |
Contributor
There was a problem hiding this comment.
BARR - remove spaces if ((pending & (1 << ptr->channel)))
Madis242
reviewed
Mar 3, 2022
|
|
||
|
|
||
| ldma_handler_conf_t* ptr = &m_head; | ||
| while(ptr != NULL) |
Madis242
reviewed
Mar 3, 2022
| { | ||
| if ( pending & (1<<ptr->channel) ) | ||
| if ( pending & (1 << ptr->channel) ) | ||
| { |
Contributor
There was a problem hiding this comment.
Identation - open all files in editor and convert tabs to spaces and check after that the indentation is correct
Madis242
reviewed
Mar 3, 2022
| m_ldma_handler_conf.signal = LOGGER_THREAD_FLAG_LDMA_DONE; | ||
| m_ldma_handler_conf.thrd = &m_ldma_thread; | ||
| m_ldma_handler_conf.thrd = m_ldma_thread; | ||
| m_ldma_handler_conf.name = 69; |
Contributor
There was a problem hiding this comment.
Use constants instead of mystical numbers. e.g. #define DEFAULT_CONF_NAME 69
Member
|
This looks to duplicate functionality already provided by dmadrv.h ... which the logger already supports. dmadrv.h is also used by DALI and smenete microphones/microwave and there they all work together merrily. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds universal LDMA handler.
Before only logger could use LDMA now through this handler any application is able to interface with LDMA.